package org.example.game.history;

/**
 * @Description: TODO
 * @Author wyatt
 * @Data 2024/06/09 10:35
 */
public class Solution100325 {

    public static void main(String[] args) {
        Solution100325 solution100325 = new Solution100325();
        System.out.println(solution100325.numberOfChild(3, 5));
    }

    public int numberOfChild(int n, int k) {
        //n-1 就传完一轮

        int x = k/(n-1);
        int y = k%(n-1);

        if(x % 2 == 0){
            return y;
        }else {
            return  n-1-y;
        }

    }

}
